home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / dlibsrc.arc / STRNICMP.C < prev    next >
Encoding:
Text File  |  1988-10-05  |  244 b   |  12 lines

  1. int strnicmp(str1, str2, limit)
  2.     register char *str1, *str2;
  3.     register int limit;
  4.     {
  5.     register char c1, c2;
  6.  
  7.     while(((c1 = tolower(*str1++)) == (c2 = tolower(*str2++))) && --limit)
  8.         if(c1 == '\0')
  9.             return(0);
  10.     return(c1 - c2);
  11.     }
  12.